﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var uid = textBox1.Text;
            var pwd = textBox2.Text;
            var repwd = textBox3.Text;

            var uid2 = !string.IsNullOrEmpty(uid);
            var pwd2 = !string.IsNullOrEmpty(pwd);
            var repwd2 = !string.IsNullOrEmpty(repwd);

            if (uid2 && pwd2 && repwd2)
            {
                MessageBox.Show("注册成功！");
                Form1.users.Add(uid, pwd);
                this.Close();
            }
            else
            {
                MessageBox.Show("注册失败，账号密码不能为空");
            }

        }
    }
}
